var express = require('express');
var router = express.Router();
var query = require('../db/db');
var datactrl = require('../code/date');

/* GET data listing. */
router.get('/day', function (req, res, next) {
    datactrl.datactrl.day(req, function (json_data) {
        res.send(json_data);
    })
});

router.get('/id', function (req, res, next) {
    datactrl.datactrl.id(req, function (json_data) {
        res.send(json_data);
    })
});


router.get('/last10', function (req, res, next) {
    datactrl.datactrl.last10(req,function(json_data){
        res.send(json_data);
    })
});

module.exports = router;
